<%@ Page Language="C#" Culture="auto" MasterPageFile="~/Common/WebSiteMaster.master" AutoEventWireup="true" CodeBehind="E_SysCultureInfo.aspx.cs" Inherits="ScottCateAjax2008.Lesson06.E_SysCultureInfo" Title="Sys.CultureInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:ScriptManager EnableScriptGlobalization="true" id="SM1" runat="server" >
        <Scripts>
            <asp:ScriptReference Path="E_SysCultureInfo.aspx.js" />
        </Scripts>
    </asp:ScriptManager>
    
    Sys.CultureInfo as 5 fields.
    <ul>
        <li>CurrentCulture</li>
        <li>InvariantCulture</li>
    </ul>
    Which in turn each have a populated
    <ul>
        <li>name</li>
        <li>dateTimeFormat</li>
        <li>numberFormat</li>
    </ul>
    <b>Important: </b> There is over head involved so this is turned off be default (will always be 'en-US'),
    in order to use culture information accurately, you must have ... 
    <ul>
        <li>ScriptManager set to EnableScriptGlobalization="true" <b>AND</b></li>
        <li>culture="auto" in @Page directive<b>AND/OR</b></li>
        <li>culture="auto" web.config Configuration.System.Web.Globalization</li>
    </ul>
    
    <input type="button" id="ClearResults" value="Clear Results" language="javascript" onclick="return clearResults()" /><br />
    <input type="button" id="CurrentCulturename" value="CurrentCulture name" language="javascript" onclick="return CurrentCulturename_onclick()" />
    <input type="button" id="CurrentCulturedateTimeFormat" value="CurrentCulture dateTimeFormat" language="javascript" onclick="return CurrentCulturedateTimeFormat_onclick()" />
    <input type="button" id="CurrentCulturenumberFormat" value="CurrentCulture numberFormat" language="javascript" onclick="return CurrentCulturenumberFormat_onclick()" /><br />
    <input type="button" id="InvariantCulturename" value="InvariantCulture name" language="javascript" onclick="return InvariantCulturename_onclick()" /><input type="button" id="InvariantCulturedateTimeFormat" value="InvariantCulture dateTimeFormat" language="javascript" onclick="return InvariantCulturedateTimeFormat_onclick()" />
    <input type="button" id="InvariantCulturenumberFormat" value="InvariantCulture numberFormat" language="javascript" onclick="return InvariantCulturenumberFormat_onclick()" />
    
    <hr />
    
    <div id="results"></div>
</asp:Content>
